Optical information reading device

ABSTRACT

Provided is an optical information reading device that can reduce an installation load on a user, and can accurately read a code provided to each of various workpieces. A polarized illumination light source includes light emitters that irradiate the workpiece with illumination light through a polarization filter. A non-polarized illumination light source includes light emitters that irradiate the workpiece with illumination light without through a polarization filter. An imaging element is provided with a polarization filter having a polarization direction different from a polarization direction of the polarization filter of the light emitters. Either of the polarized illumination light source and the non-polarized illumination light source is used in accordance with the workpiece.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application claims foreign priority based on Japanese PatentApplication No. 2014-157029, filed Jul. 31, 2014, the contents of whichis incorporated herein by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a fixed optical information readingdevice of optical information reading devices that optically readinformation.

2. Description of Related Art

There are a handy-type optical information reading device that reads acode in a state where an operator holds the device in his or her hand,and a fixed optical information reading device that is fixed and readsinformation by moving an object with a code attached. A two-dimensionalcode reader (hereinafter, referred to as a reader) that reads atwo-dimensional code such as a barcode, and a QR code (registeredtrademark) has been widely spread. One example of the above-describedreader is described in JP 2011-76519 A. In JP 2011-76519 A and JPH7-282175 A, provision of a polarization filter in each of anillumination optical system and an imaging optical system is described.

-   Patent Literature 3: JP H10-287873 A

When a reader is downsized, an optical axis of an imaging element and anoptical axis of an illumination system cannot but be made parallel toeach other. This is because a distance between the optical axis of theimaging element and the optical axis of the illumination system cannotbut be shortened. In the above-described reader, illumination lightreflects at a surface of a workpiece (an inspection object product), andregular reflected light enters the imaging element, which makes it hardto read a two-dimensional code. Consequently, the reader needs to beinstalled with an optical axis of the reader inclined to a normal lineof the surface of the workpiece so that the normal line and the opticalaxis do not coincide with each other. This is referred to as obliqueattachment. The attachment of the reader in which the normal line of thesurface of the workpiece and the optical axis of the reader are parallelis referred to as front attachment. If the surface of the workpiece isalmost planar, inclining the optical axis to the normal line only by arecommended angle enables the two-dimensional code to be readaccurately.

In recent years, the two-dimensional code has been printed on a surface(a casting surface) of a casting such as an engine block by lasermarking or the like (so-called direct part marking (DPM)). Since asknown well, minute irregularities exist on the surface of the casting,the front attachment brings about higher reading accuracy than theoblique attachment. Moreover, since the two-dimensional code is printedin various parts such as a surface (milled surface) of a workpiecesubjected to milling, black resin, and a substrate, a proper readingmethod differs in the respective parts. Thus, a user needs to search foran installation angle suitable for each workpiece.

Moreover, in the oblique attachment, an image obtained by reading thetwo-dimensional code is distorted, which may cause a reading error.Thus, the front attachment makes it unnecessary to search for theinstallation angle, thereby reducing an installation load on the user.Moreover, the front attachment has an advantage that the image is notdistorted.

As described in JP 2011-76519 A and JP H7-282175 A, the provision of thepolarization filters can reduce influence of the regular reflected lighteven in the front attachment. However, the provision of the polarizationfilters disables the reader from reading a code provided by the directpart marking on the casting surface. While it can be considered to makethe polarization filters detachable, labor for detachment newly occurs.

SUMMARY OF THE INVENTION

In this manner, reduction in the installation load on the user has beenrequested from the market, regarding the above-described reader thatreads various workpieces. Consequently, an object of the presentinvention is to provide an optical information reading device that canreduce an installation load on a user, and can accurately read a codeprovided to each of various workpieces.

According to the present invention, there is provided an opticalinformation reading device, for example, including:

a first illumination section that illuminates a workpiece and irradiatesthe workpiece with illumination light through a polarization filter;

a second illumination section that illuminates the workpiece andirradiates the workpiece with illumination light without through apolarization filter;

an imaging section provided with a polarization filter having apolarization direction different from a polarization direction of thepolarization filter of the first illumination section, the imagingsection for receiving light through the polarization filter having thepolarization direction different from the polarization direction of thepolarization filter of the first illumination section to capture animage of a code provided in the workpiece, the light being light fromthe workpiece irradiated by at least one of the first illuminationsection and the second illumination section; and

a decoding section that decodes image data acquired by the imagingsection.

According to the present invention, provided is an optical informationreading device that can reduce an installation load on a user, and canaccurately read a code provided to each of various workpieces.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram showing an optical information reading device;

FIGS. 2A and 2B are diagrams showing a structure of the opticalinformation reading device;

FIGS. 3A to 3C are diagrams showing a support structure of an imagedisplay device;

FIG. 4 is a diagram showing display and an operation panel of theoptical information reading device;

FIG. 5 is a diagram showing an electronic configuration of the opticalinformation reading device;

FIG. 6 is a diagram showing a computer connected to the opticalinformation reading device;

FIGS. 7A and 7B are diagrams showing one example of shapes ofpolarization filters;

FIGS. 8A and 8B are diagrams showing the one example of the shapes ofthe polarization filters:

FIG. 9 is a flowchart showing tuning of a reading condition;

FIG. 10 is a flowchart showing coarse adjustment of a brightness level;and

FIG. 11 is a diagram showing one example of a search range of thebrightness level with respect to each illumination mode.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

In the following, an embodiment of the present invention will bedescribed. The individual embodiments described in the following will beuseful for understanding various concepts such as a superordinateconcept, a medium concept, a subordinate concept and the like of thepresent invention. Moreover, the technical scope of the presentinvention is defined by the claims, and is not limited by the followingindividual embodiments.

FIG. 1 is a diagram showing one example of a reader system (an opticalinformation reading device). A line 1 is a conveyance belt or the likethat conveys a workpiece 2 which is an inspection object. A reader 3 isa two-dimensional code reader that reads and decodes a two-dimensionalcode. The reader 3 itself is also an optical information reading devicein a narrow sense. A programmable logic controller (PLC 5) is a controldevice that controls the line 1 and the reader 3. A computer 4 is aninformation processing device that sets an operating condition and thelike for the reader 3, and obtains a decoding result from the reader 3to display the same.

<Structure of Reader 3>

FIG. 2A is a perspective diagram of the reader 3, and FIG. 2B is anexploded diagram of essential parts. Since the shape of the reader 3 issubstantially rectangular parallelepiped, outer surfaces of the housingroughly consist of six surfaces. As shown in FIG. 2B, four openings areprovided in a front case 10. In the opening on an upper surface side, aholder 13, an image display device 14 supported by the holder 13, adisplay panel 15 arranged so as to cover the image display device 14,and a main sheet 16 are provided. In the opening on a front surface sideof the front case 10, a window portion 11 having translucency and afront cover 12 are provided. In particular, in the present embodiment, apolarization filter is provided in a part of the window portion 11. Areflector 17 and an illumination substrate 18 are inserted from theopening on a back surface side of the front case 10, and a rear case 19is put like a lid. In the rear case 19, a main substrate 21, and anoptical system 50 and an AF mechanism 51 fixed to the main substrate 21are provided. The reflector 17 is a structural part to efficientlyirradiate a front side with light from light emitters provided in theillumination substrate 18. In the reflector 17, there are provided cone(truncated cone) type light condensing portions 176 to 179 to condensethe light from the light emitters for illumination on the front side andirradiate the front side, and a cone type light condensing portion 175to condense light from the light emitter for a pointer on the front sideto irradiate the front side. These are gold-plated, for example, inorder to increase light condensation efficiency. A connector holder 20is attached to the opening on a lower surface side of the front case 10.Two communication cables are connected to the connector holder 20, andare connected to the computer 4 and the PLC 5, respectively. A connectorsubstrate is attached to the connector holder 20.

FIGS. 3A to 3C are diagrams for describing a structure around the holder13. As shown in FIGS. 3A and 3B, the holder 13 is a support member thatsupports the image display device 14. The illumination substrate 18extends in a direction perpendicular to the holder 13 and is engagedwith the holder 13 to support the holder 13. That is, the holder 13 isprovided parallel to an upper surface of the front case 10, and theillumination substrate 18 is provided parallel to a front surface of thefront case 10, so that both are perpendicular to each other. A groove131 is provided on a lower surface side of the holder 13, and an endportion of the illumination substrate 18 may be fitted in the groove 131to thereby firmly fix the holder 13 to the illumination substrate 18.Employing the above-described holder 13 can make a circuit board forattaching the image display device 14 unnecessary.

As shown in FIGS. 3A and 3C, in the illumination substrate 18, there maybe arranged push-button type switches 24, 25 in each of which a pressingsurface exists on the same side as a display surface side of the imagedisplay device 14. A constitution may be such that the switches 24, 25are pressed by pressing members 22, 23 constituted integrally with theholder 13, respectively, so that respective contacts are closed. Since apressing direction of the switches 24, 25 and a length direction of theillumination substrate 18 supporting the holder 13 are coincident witheach other, the holder 13 is hard to be warped even when the switches24, 25 are pressed. The pressing member 22 is supported by an elasticarm portion 39 a extending from a main constituent of the holder 13.Similarly, the pressing member 23 is supported by an elastic arm portion39 b extending from the main constituent of the holder 13. The pressingmembers 22, 23 pressed down return to original positions by elasticityof the arm portions 39 a, 39 b. Since the arm portions 39 a, 39 b areconstituted integrally with the holder 13, there is an advantage thatadditional members for returning such as springs can be omitted.

As shown in FIGS. 3A and 3B, the illumination substrate 18 is providedwith a circular opening portion 33 to mount an optical system module(the optical system 50, the AF mechanism 51 and the like) providedcorresponding to an imaging element 31. Four light emitters 26 to 29 forillumination are provided around the opening portion 33. As shown inFIG. 3A, one or a plurality of light emitters 32 functioning as anindicator are provided in the vicinity of an engagement portion betweenthe illumination substrate 18 and the holder 13. An opening portion 34for guiding light is provided in the holder 13 so that light from thelight emitters 32 is outputted outside from the upper surface of thefront case 10. That is, the indicator is arranged between the twoswitches 24, 25. As shown in FIG. 3C, four sides of the opening portion34 are surrounded by light-shielding walls 36 a to 36 d, which makes thelight of the indicator hard to leak to the image display device 14. Theholder 13 is provided with a container groove 37 to contain the imagedisplay device 14. A hole portion 38 to pass a signal cable of the imagedisplay device 14 is provided in a bottom portion of the containergroove 37.

As shown in FIG. 3B, the imaging element 31 is arranged in the mainsubstrate 21. As shown in FIG. 3B, in the illumination substrate 18, alight emitter 35 that outputs light for the pointer is arranged. Asdescribed above, in the reflector 17, in addition to the lightcondensing portion 175 for the light emitter 35, the light condensingportions 176 to 179 for light emitters 26 to 29 are provided. The lightcondensing portions 175 to 179 each have a cone shape, so that the lightcomes in from an opening on a top side of the cone and goes out from abottom surface side.

FIG. 4 is a diagram showing the main sheet 16. A display surface 40 ofthe image display device 14 is provided in a central portion of the mainsheet 16. A select key 42, an indicator 44, and an enter key 43 areprovided in a lower portion of the main sheet 16. The select key 42 ismade up of the above-described switch 24 and pressing member 22. Theenter key 43 is made up of the above-described switch 25 and pressingmember 23. The indicator 44 is made up of the two light emitters 32, andfor example, when reading of the two-dimensional code succeeds, thegreen light emitter lights, and when the reading of the two-dimensionalcode fails, the red light emitter lights. The image display device 14may display an image (SEL and MENU (however, it may be displayed as ENT)in FIG. 4) that shows the user assignments of the select key 42 and theenter key 43 in addition to an image (a still image or a moving image)acquired by the imaging element 31.

<Control Unit>

FIG. 5 is a block diagram showing an electronic configuration of thereader 3. A camera unit (imaging section) of the reader 3 has theimaging element 31, the optical system 50, the AF mechanism 51, anillumination unit 52 and the like. The imaging element 31 is an imagesensor such as a CCD and a CMOS that converts an image of thetwo-dimensional code formed through the optical system 50 to anelectrical signal. The AF mechanism 51 is a mechanism that adjusts aposition and a refractive index of a lens for focusing in the opticalsystem 50. The AF mechanism 51 and the optical system 50 are arrangedbetween the imaging element 31 and the opening portion 33 in FIG. 3B.The AF mechanism 51 and the optical system 50 may be integrated to makeup the optical system module.

The illumination unit 52 is a unit that has one or more light emittersto illuminate the two-dimensional code. The illumination unit 52 has,for example, the light emitters 26 to 29 for illumination, and the lightemitter 35 for the pointer. The light of the pointer is a criterion foran optical axis of the optical system 50, and the user may place theworkpiece 2 at a proper position with reference to a position of thepointer.

A decoding unit 53 is a unit that decodes image data 72 of thetwo-dimensional code acquired by the imaging element 31 to write adecoding result 71 in a storage unit 70. A communication unit 54 is aunit that communicates with the PLC 5 and the computer 4. Thecommunication unit 54 may include, for example, an I/O unit thatcommunicates with the PLC 5, a serial communication unit such as anRS232C, a network communication unit such as a wireless LAN and wiredLAN and so on.

A display unit 55 includes the image display device 14 and the lightemitters 32 for indicator. The display unit 55 may display, for example,a character string, which is the decoding result 71 of thetwo-dimensional code, a reading success rate (an average reading successrate when reading processing is executed a plurality of times), amatching level (a reading margin indicating easiness of the reading),PPC (pixel per cell: a value indicating how many pixels one of cellsmaking up the two-dimensional code is equivalent to in the image data),and the like. An input unit 56 is a unit that accepts an input operationof each of the switches or the like, and includes the select key 42 andthe enter key 43.

A control unit 60 is a unit that comprehensively controls the respectiveunits of the reader 3. The control unit 60 has various functions, andthese may be implemented by a logical circuit, or by executing software.An autofocus control unit (AF control unit) 61 is a unit that controlsthe AF mechanism 51. An imaging control unit 62 is a unit that controlsthe amount of illumination light of the illumination unit 52, and anexposure time (shutter speed) of the imaging element 31. In particular,the imaging control unit 62 functions as a lighting control section thatcontrols which of the plurality of light emitters of the illuminationunit 52 is to be lighted in accordance with an instruction from a tuningunit 65 or an arithmetic operation unit 63.

The arithmetic operation unit 63 executes various types of arithmeticoperation processing. For example, the arithmetic operation unit 63arithmetically operates the reading success rate, the matching level,and the PPC, using the decoding result, the image data and the like.Obviously, these arithmetic operations may be executed in a unit otherthan the arithmetic operation unit 63, such as the decoding unit 53 andthe tuning unit 65.

The tuning unit 65 functions as a reading condition control section thatcontrols a reading condition or a condition decision section thatdecides an illumination condition. The reading condition is, for examplean imaging condition such as the exposure time, the amount ofillumination light, and a gain, and an image processing condition (acoefficient of a filter and the like) in the decoding unit 53. Theproper imaging condition and image processing condition are changed byinfluence of natural light on the workpiece 2 conveyed on the line 1, orthe like. The tuning unit 65 thus searches for a more proper readingcondition to set the AF control unit 61, the imaging control unit 62,and the decoding unit 53.

A UI management unit 66 is a unit that displays the image data on theimage display device 14, accepts a user instruction from the input unit56, and controls the lighting of the indicator.

The storage unit 70 is a storage device such as a memory, and stores thedecoding result 71 acquired by the decoding unit 53, the image data 72acquired by the imaging element 31, and setting data 73 which is dataset for reader 3 by a setting device such as the computer 4, and dataset by the input unit 56 and so on.

FIG. 6 is a block diagram showing functions of the computer 4.Downsizing of the reader 3 makes it difficult to set all the functionsof the reader 3 only by the display unit 55 and the input unit 56 of thereader 3. Consequently, a part of the setting data 73 may be created inthe computer 4 to be transferred to the reader 3. A CPU 80 is a unitthat controls respective units included by the computer 4, based on aprogram stored in a storage unit 90. A UI control unit 83, which is onefunction of an arithmetic operation unit 81, generates a user interfaceto set the imaging condition (in particular, whether or not the lightemitters with the polarization filter attached are to be used) and thelike of the reader 3, and a user interface to display the decodingresult 71, the image data 72 and the like outputted by the reader 3 tocause a display unit 84 to display the user interfaces. The arithmeticoperation unit 81 is a unit that executes various arithmetic operations.A communication unit 86 connects to the communication unit 54 of thereader 3 by wired or wireless connection to receive the decoding result71 and the image data 72, and transmits the setting data 73 generated ina setting unit 82. The storage unit 90 is a memory, a hard disk drive(HDD), a solid state drive (SSD) or the like.

<Illumination Modes (Polarization Mode and Non-Polarization Mode)>

In the present embodiment, in order to reduce an installation load onthe user, and accurately read a code provided to each of variousworkpieces, a plurality of illumination sections are provided, and in afirst illumination section, a polarization filter is arranged, and in asecond illumination section, no polarization filter is arranged. Thefirst illumination section and the second illumination section are usedproperly in accordance with each of the workpieces. This allows the userto save labor for adjusting an installation angle of the reader 3 foreach of the workpieces.

As described above, when the front attachment with respect to theworkpiece 2 is applied to the reader 3, a large amount of regularreflected light from the workpiece 2 easily enters the imaging element31. This is likely to occur in the case where a surface on the workpiece2 where the two-dimensional code is provided is a smooth surface, andcauses failure of the decoding of the two-dimensional code. In order tocut the regular reflected light, it can be considered that polarizationfilters having different polarization directions are arranged in theimaging element 31 and the illumination unit 52. However, if the wholeillumination unit 52 is covered with the polarization filter, thetwo-dimensional code provided on a surface of a casting by direct partmarking cannot be read accurately. That is, reading accuracy of thetwo-dimensional code printed on the casting surface is higher when thepolarization filter is not provided in the illumination unit 52. In thismanner, whether to provide the polarization filter depends on a surfaceof the workpiece 2 and a method for providing the two-dimensional code.Moreover, when the polarization filter is provided, the amount of lightattenuates to ½ at the polarization filter on a light emission side, andthe amount of light further attenuates to ½ at the polarization filteron a light reception side. That is, the amount of light attenuates to ¼in total. As the amount of light attenuates, the reading of thetwo-dimensional code fails more easily. If in order to compensate for anattenuation amount, the amount of light emission of the light emittersis increased, not only power consumption is increased, but heat isincreased. These can be disadvantageous.

As a method for handling the various workpieces 2 with one reader 3,employing a detachable type polarization filter that covers emissionareas of all the light emitters corresponding to the workpiece 2 can beconsidered. In this case, however, the user needs to determine whetherthe polarization filter is to be provided or removed by himself orherself, and needs to perform the attachment and the detachment of thepolarization filter by hand. That is, while adjustment of theinstallation angle is not required for the user, instead,installation/detachment work of the polarization filter is required.

Consequently, in the present embodiment, proposed is the reader 3 inwhich the first illumination section provided with the polarizationfilter, and the second illumination section not provided with thepolarization filter are provided, and these illumination sections areused by switching in accordance with each of the workpieces 2.

FIG. 7A is a perspective diagram of the reader 3, and FIG. 7B is anenlarged diagram of the window portion 11. In the window portion 11, apolarization filter 91 is provided in a portion where the light of thelight emitter 26 is emitted (a light emission area), and a portion wherethe light of the light emitter 27 is emitted. Moreover, in the windowportion 11, a polarization filter 92 is provided in a portion from whichthe light enters the optical system of the imaging element 31 (a lightincidence area). A polarization direction of the polarization filter 91and a polarization direction of the polarization filter 92 aredifferent, and for example, different by 90 degrees. On the other hand,in the window portion 11, no polarization filter is provided in aportion where the light of the light emitter 28 is emitted, and aportion where the light of the light emitter 29 is emitted. In thismanner, the light emitter 26 and the light emitter 27 may form the firstillumination section, and the light emitter 28 and the light emitter 29may form the second illumination section. That is, in place ofperforming the installation and the detachment of the polarizationfilter by the user, the reader 3 only needs to electrically switchbetween both the illumination sections. For example, for the workpieceto which the absence of the polarization filter is advantageous (e.g., acasting or the like), the second illumination section is lighted, andthe first illumination section is put out. On the other hand, for theworkpiece to which the presence of the polarization filter isadvantageous (e.g., the workpiece having the two-dimensional code on aprinted board, a milled surface, black resin or the like), the firstillumination section is lighted, and the second illumination section isput out. This can largely reduce a load on the user, and enables thetwo-dimensional codes provided in the various workpieces to beaccurately read with the single reader 3.

FIG. 8A shows one example of shapes of the polarization filter 91 andthe polarization filter 92. In particular, the polarization filter 92for the imaging element has a substantially circular shape, andalignment members 93 a, 93 b are provided at a left end and a right endof the polarization filter 92, respectively. A left end and a right endof a bottom portion of the polarization filter 91 match the shapes ofthe alignment members 93 a, 93 b, and are made linear in this example. Acenter of the bottom portion of the polarization filter 91 issubstantially semicircular, and matches the shape of an upper portion ofthe polarization filter 92. In this manner, employing the alignmentmembers 93 a, 93 b makes it easy to precisely paste the polarizationfilter 91 and the polarization filter 92 to the window portion 11.Moreover, the shape of a top portion of the polarization filter 91matches the shape of a top portion of the window portion 11, which makesit easy to precisely align and paste the polarization filter 91 to thewindow portion 11.

<Switching Between Presence and Absence of Polarization Filter>

A switching method between a polarization mode and a non-polarizationmode will be described with reference to FIGS. 9 and 10. FIG. 9 is aflowchart showing steps of tuning processing. When the input unit 56 orthe computer 4 instructs to perform the tuning, the tuning unit 65executes the following respective steps.

In S901, the tuning unit 65 executes code search. For example, thetuning unit 65 causes the imaging control unit 62 to execute imaging andacquire the image data, and causes the decoding unit 53 to search forthe two-dimensional code, based on the image data. The imaging controlunit 62 reads, from the setting data 73, the reading condition (theimaging condition of the imaging element 31, the illumination conditionof the illumination unit 52, an image processing condition of thedecoding unit 53, and the like) that is enabled at that point to set thesame for the illumination unit 52, the imaging element 31, the decodingunit 53 and the like. The decoding unit 53 searches for thetwo-dimensional code from the image data 72 of the two-dimensional codeacquired by the imaging element 31 to output a search result to thetuning unit 65. The illumination condition includes informationindicating which of the polarization mode and the non-polarization modeis to be enabled.

In S902, the tuning unit 65 executes coarse adjustment of brightness ofthe illumination unit 52. FIG. 10 is a flowchart showing details of thecoarse adjustment of the brightness in S902. In the present embodiment,the coarse adjustment of the brightness is executed, a more excellentreading result is selected between those in the polarization mode and inthe non-polarization mode, and fine adjustment of the brightness isexecuted with respect to the selected illumination mode.

In S921, the tuning unit 65 switches to the illumination mode differentfrom the illumination mode set in the illumination unit 52 at thatpoint. That is, the tuning unit 65 switches to the non-polarization modeif the polarization mode is set in the illumination unit 52, andswitches to the polarization mode if the non-polarization mode is set.

In S922, the tuning unit 65 executes a reading test. For example, thetuning unit 65 causes the imaging control unit 62 to execute theimaging, and causes the decoding unit 53 to execute the search for thetwo-dimensional code. In the reading condition enabled at that point,only the illumination mode is changed. The decoding unit 53 searches forthe two-dimensional code with respect to the image data 72 of thetwo-dimensional code acquired by the imaging element 31 to output thesearch result to the tuning unit 65.

In S923, the tuning unit 65 determines whether or not the reading testhas succeeded, based on the search result from the decoding unit 53.When the reading test is executed a plurality of times while changingthe reading condition, it is determined whether or not the reading hassucceeded even once. When the reading test succeeds, it means that thetwo-dimensional code can be decoded both in the polarization mode and inthe non-polarization mode. Consequently, the processing proceeds toS924.

In S924, the tuning unit 65 executes the reading test for each of n(e.g., 27) brightness levels of N (e.g., 256) brightness levels withrespect to each of the illumination modes. Thereby, the reading resultwith respect to each of the 27 brightness levels in the polarizationmode can be obtained, and the reading result with respect to each of the27 brightness levels in the non-polarization mode can be obtained. Asshown in FIG. 11, the brightness levels as objects of the tuning may bedifferent between in the polarization mode and the non-polarizationmode. As described above, the brightness in the polarization mode ishalf of the brightness in the non-polarization mode. Consequently, asthe brightness levels in the polarization mode, N/2 or more levels ofthe N levels may be assigned, and as the brightness levels in thenon-polarization mode, levels less than N/2 of the N levels may beassigned. This can shorten time of the reading test to half, as comparedwith a case where all the N levels are comprehensively searched.Obviously, if time shortening is not requested, all the N levels may becomprehensively searched in each of the illumination modes.

In S925, the tuning unit 65 decides the illumination mode whose decodingresult is favorable among the plurality of illumination modes. Forexample, the tuning unit 65 compares the numbers of successes in thereading test in the respective illumination modes to decide theillumination mode in which the reading has succeeded more. For example,if in the polarization mode, 27 reading tests have succeeded, and in thenon-polarization mode, 10 reading tests have succeeded, the polarizationmode is selected. When the number of successes of the polarization modeand the number of successes of the non-polarization mode are the same,or when a significant difference is not recognized, the tuning unit 65may select the non-polarization mode. This is because when the samebrightness is obtained, the non-polarization is more advantageous inpower consumption and heat. However, in an environment where disturbancelight or the like easily occurs, the reading success rate is higher inthe polarization mode because the polarization filter can cut a part ofthe disturbance light. In the above-described case, thus, thepolarization mode may be employed preferentially. While here, thenumbers of successes in the reading test are compared, the tuning unit65 may compare the reading success rates, or may calculate and comparethe matching levels indicating the easiness of the reading.

In S926, the tuning unit 65 decides a coarse adjustment result of thebrightness. For example, it is assumed that the brightness level can bechanged from 0 to 255. In S924, the reading tests are executed for the nlevels. The tuning unit 65 calculates a level (e.g., an average value),which is a center of m levels at which the reading has succeeded. Inthis manner, the coarse adjustment of the brightness is executed.

If in S923, the reading test has never succeeded in the otherillumination mode, the tuning unit 65 omits or stops the searchprocessing of the reading condition in the other illumination mode toselect the former illumination mode, and the processing proceeds toS927. In S927, the tuning unit 65 executes the reading test for each ofthe n (e.g., 27) brightness levels with respect to the formerillumination mode. Thereby, the reading result can be obtained for eachof the 27 brightness levels with respect to the polarization mode or thenon-polarization mode as the former illumination mode. Thereafter, theprocessing proceeds to S926 in which the tuning unit 65 calculates alevel (e.g., an average value), which is a center of m levels at whichthe reading has succeeded.

When the coarse adjustment ends, the fine adjustment in S903 isexecuted. In S903, the tuning unit 65 varies the brightness around thebrightness level decided by the coarse adjustment and searches for thebrightness level at which the reading success rate or the matching levelis highest to decide the level.

In S904, the tuning unit 65 executes the reading test again. In S905,the tuning unit 65 determines whether or not the reading success rate orthe number of times of success exceeds a threshold value. If the readingsuccess rate or the number of times of success exceeds the thresholdvalue, the tuning unit 65 ends the tuning processing. On the other hand,if the reading success rate or the number of times of success does notexceed the threshold value, the processing proceeds to S906. In S906,the tuning unit 65 changes the reading condition other than thebrightness (e.g., the exposure time, the gain, the coefficient of theimage processing filter and the like), and returns the processing toS901.

<Conclusion>

In the present embodiment, as described in FIGS. 3B and 7A, the lightemitters 26, 27 that irradiate the workpiece 2 with the illuminationlight through the polarization filter 91, and the light emitters 28, 29that irradiate the workpiece 2 with the illumination light through nopolarization filter are provided as illumination sections thatilluminate the workpiece 2. In the imaging element 31, the polarizationfilter 92 having the polarization direction different from thepolarization direction of the polarization filter 91 of the lightemitters 26, 27 is provided. The imaging element 31 receives the lightfrom the workpiece 2 illuminated by at least one of the light emitters26, 27 and the light emitters 28, 29 through the polarization filter 92,and captures the image of the code provided in the workpiece 2. Thedecoding unit 53 decodes the image data acquired by the imaging element31. In this manner, in the present embodiment, the light sources forpolarization and light sources for non-polarization are included, sothat either of them can be selected and lighted. In particular, the useof the polarization filters can cut the influence of the regularreflected light, so that the front attachment of the reader 3 isallowed. Thus, the installation load on the user can be reduced.Moreover, since the light sources for polarization and the light sourcesfor non-polarization can be used properly in accordance with each of theworkpieces 2, the reader 3 that can accurately read the code provided tothe workpiece 2 is obtained. For example, the polarization mode in whichonly the light sources for polarization are lighted is advantageous tothe workpiece 2 on which regular reflection easily occurs, such as aprinted board. On the other hand, the non-polarization mode in whichonly the light sources for non-polarization are lighted is advantageousto the code on a casting provided by the direct marking. While in thepresent embodiment, a description has been given, focusing on thetechnique of selectively lighting the light sources for polarization andthe light sources for non-polarization (lighting bothnon-simultaneously), the imaging control unit 62 may light bothsimultaneously, if the amount of light of only one of them is notsufficient.

As described with reference to FIGS. 9, 10 and the like, the tuning unit65 may decide the illumination condition, based on which is morefavorable, the decoding result of the decoding unit 53 acquired in astate where the light emitters 26, 27 for polarization are lighted andthe light emitters 28, 29 for non-polarization are not lighted, or thedecoding result of the decoding unit 53 acquired in a state where thelight emitters 26, 27 for polarization are not lighted, and the lightemitters 28, 29 for non-polarization are lighted. Which of thepolarization mode and the non-polarization mode is more advantageousdiffers, depending on the workpiece 2. Thus, the reading test isactually executed to select the illumination mode that has brought aboutthe more excellent result, which will increase the reading success rate.As the decoding result, the matching level as an index indicating theeasiness of the reading of the code, or the number of times of thesuccess in decoding of the code or the like may be employed. In each ofthe reading results, there are only two results of success and failure,so that superiority or inferiority cannot be determined. Consequently,the matching level or the number of times of success obtained byexecuting the reading a plurality of times is set as a criterion of thedetermination, by which the illumination mode advantageous to each ofthe workpieces can be easily decided.

There is a case where no significant different exists between thedecoding result in the polarization mode and the decoding result in thenon-polarization mode. In this case, the polarization mode may beemployed. Since the disturbance light is reduced by the polarizationfilter in the polarization mode, the polarization mode may be moreadvantageous in a factory where there is much disturbance light, or thelike.

Moreover, when the decoding succeeds in both the polarization mode andthe non-polarization mode, the non-polarization mode may be employed.Employing the non-polarization mode has advantages of being able to cutpower consumption in the light emitters, and cut the amount of heatradiation. In particular, in an environment of less disturbance light,the power consumption or the like may be emphasized. In this case, thus,the non-polarization mode is desirably employed.

As described above, the tuning unit 65 controls the reading conditionincluding the imaging condition of the imaging element 31 and the imageprocessing condition in the decoding unit 53. The tuning unit 65 maystart the search for the reading condition after the illuminationcondition has been decided. That is, after the non-polarization mode orthe polarization mode is first decided, the adjustment may be made sothat the exposure time, the gain, the coefficient of the imageprocessing filter and the like as the reading condition become moreproper. The processing for deciding the reading condition is likely torequire more enormous work than the processing for deciding theillumination mode. For example, the amount of work will be very large ifthe adjustment processing of the reading condition is executed for eachof the illumination modes. Consequently, the illumination mode isdecided, and then, the adjustment processing of the reading condition isexecuted, which can largely cut the amount of work as a whole.

As described with reference to FIGS. 9, 10 and the like, the tuning unit65 may execute the coarse adjustment of the brightness parameter in thereading condition with respect to each of the polarization mode in whichthe light emitters 26, 27 are lighted and the light emitters 28, 29 arenot lighted, and the non-polarization mode in which the light emitters26, 27 are not lighted and the light emitters 28, 29 are lighted tothereby determine in which of the polarization mode and thenon-polarization mode the decoding has succeeded more, and may furtherexecute the fine adjustment of the brightness parameter with respect tothe mode in which the decoding has succeeded more between thepolarization mode and the non-polarization mode. This enables theillumination mode and the brightness parameter to be efficientlydecided.

In the coarse adjustment, the tuning unit 65 may execute code searchprocessing of searching for the code from the image data in one mode ofthe polarization mode and the non-polarization mode. When the code isfound by the code search processing, the tuning unit 65 may switch tothe other mode of the polarization mode and the non-polarization mode toexecute the code search processing again. When the code is not found inthe other mode, the tuning unit 65 may stop the adjustment of thereading condition in the other mode to execute the adjustment of thereading condition in the one mode. In this manner, when there is lesspossibility of reading the code properly in the other mode, theadjustment in the other mode is omitted, which can largely shorten thetime required for the coarse adjustment.

As described with reference to FIG. 11, a search range of the brightnessparameter may differ between in the polarization mode and in thenon-polarization mode. There is a character that the brightness isdifferent just by a factor of two between in the polarization mode andin the non-polarization mode. Thus, a start level of the search range ofthe polarization mode may be set to be twice as high as a start level ofthe search range of the non-polarization mode. Similarly, an end levelof the search range of the polarization mode may be twice as high as anend level of the search range of the non-polarization mode. This can cutthe search time to about half, as compared with the case where thebrightness level is comprehensively searched for in each of theillumination modes.

As described with reference to FIGS. 2A and 2B, the connector holder 20functions as a connection section that connects the communication cableto output the decoding result to outside. The light emitters 26, 27 maybe arranged farther with respect to a light receiving portion of theimaging element 31 when seen from the connector holder 20, and the lightemitters 28, 29 may be arranged nearer with respect to the lightreceiving portion of the imaging element 31 when seen from the connectorholder 20.

As described with reference to FIG. 2B, the window portion 11 isarranged as a light transmitting plate in the housing on the lightemission side of the illumination light of the light emitters 26, 27 andthe light emitters 28, 29. Moreover, as described with reference toFIGS. 7A, 8A and 8B, the polarization filter 91 is attached to the area,which is a part of the window portion 11, where the light from the lightemitters 26, 27 is transmitted. Moreover, the incidence area of thelight to the imaging element 31 may be provided in an almost center ofthe light transmitting plate, which is the window portion 11, and, theemission area of the light of the light sources for polarization and theemission area of the light from the light sources for non-polarizationmay be arranged around the incidence area. Moreover, the number of lightemitters constituting the light sources for polarization and the numberof light emitters constituting the light sources for non-polarizationmay not be coincident. This is because the light emitters can bearranged around an optical axis of the imaging element 31 with goodbalance. Since when the polarization filter 91 is attached, the amountof light becomes half, the number of light emitters constituting thelight sources for polarization may be twice as large as the number oflight emitters constituting the light sources for non-polarization. Thiscan almost equalize the amount of light of respective light sources.

As described above, the polarization direction of the polarizationfilter of the light emitters 26, 27, and the polarization direction ofthe polarization filter of the imaging element 31 are different by 90degrees. This is efficient in efficiently attenuating the regularreflected light. The angle need not be absolutely 90 degrees, but aslight allowance is naturally permitted.

As described with reference to FIGS. 8A and 8B, the shape of thepolarization filter 92 of the imaging element 31 is substantiallycircular. While the shape of the polarization filter 92 can berectangular, the shape of the polarization filter 92 is made circularbecause the shape of a lens of the optical system is circular, whichwill make downsizing of the reader 3 easy. The alignment members 93 a,93 b may extend at the left end and the right end of the polarizationfilter 92, respectively. This makes the alignment easier when thepolarization filter 92 is pasted to the window portion 11. The shape ofthe polarization filter 92 including the alignment members 93 a, 93 bmay be bilaterally symmetrical. The polarization filter may not beprovided in a light emission area of the light emitter 35 for thepointer. This is because a higher intensity of reflected light from thelight emitter 35 for the pointer is preferable.

The tuning unit 65 may select either of the polarization mode and thenon-polarization mode in accordance with the setting informationreceived from the control device provided outside the reader 3, such asin the computer 4, the PLC 5 or the like. In this manner, theillumination mode may be forcibly set and fixed from the computer 4 andthe PLC 5. This enables the illumination mode to be fixed to the mode inaccordance with the user's convenience.

A description has been given on the assumption that the plurality oflight emitters 26, 27 making up the first illumination section are linedup along a conveyance direction of the two-dimensional code, and theplurality of light emitters 28, 29 making up the second illuminationsection are also lined up along the conveyance direction. However, thecombinations of the first illumination section and the secondillumination section may be changed. For example, the first illuminationsection may be made up of the light emitters 28, 29, and the secondillumination section may be made up of the light emitters 26, 27.Similarly, the first illumination section may be made up of the lightemitters 26, 28, and the second illumination section may be made up ofthe light emitters 27, 29. Similarly, the first illumination section maybe made up of the light emitters 27, 29, and the second illuminationsection may be made up of the light emitters 26, 28. The firstillumination section may be made up of the light emitters 26, 29, andthe second illumination section may be made up of the light emitters 27,28. Furthermore, the first illumination section may be made up of thelight emitters 27, 28, and the second illumination section may be madeup of the light emitters 26, 29.

Since the first illumination section is provided with the polarizationfilter, the amount of light is smaller, as compared with the secondillumination section. Consequently, the number of light emitters makingup the first illumination section may be larger than the number of lightemitters making up the second illumination section. Similarly, the lightemitters in each of which a maximum amount of light is larger may beemployed as the light emitters making up the first illumination section,and the light emitters in each of which the maximum amount of light issmaller may be employed as the light emitters making up the secondillumination section. This enables the decrease in the amount of lightby the polarization filter to be compensated for.

While a description has been given on the assumption that thepolarization filters 91, 92 are stuck to the window portion 11, thesefilters may be detachable polarization filters.

As to the reading condition as an object of the tuning, a plurality ofcombinations (banks) may be prepared in advance. The tuning unit 65 mayswitch the banks and execute the reading test to thereby decide theproper bank for each of the workpieces. Each bank includes the settinginformation indicating which of the polarization mode and thenon-polarization mode is to be employed.

As described with reference to FIG. 2B and the like, for at least one ofthe optical system of the imaging element 31, the first illuminationsection and the second illumination section, the reflector 17, which isa light condensing member, may be employed. The light condensing memberof the reflector 17 for the imaging element may be a light condensingmember having a circular shape in a cross section parallel to theimaging surface of the imaging element 31. That is, a cone type or atruncated cone type light condensing member may be employed. Similarlight condensing members may be employed for the light emitters 26 to29. In particular, since the employment of the polarization filterdecreases the amount of light, the light condensing member maycompensate for the decrease in the amount of light.

What is claimed is:
 1. A fixed optical information reading device,comprising: a first illumination section that irradiates the workpiecewith illumination light through a polarization filter; a secondillumination section that irradiates the workpiece with illuminationlight without any polarization filter; an imaging section provided witha polarization filter having a polarization direction different from apolarization direction of the polarization filter of the firstillumination section, the imaging section for receiving light throughthe polarization filter having the polarization direction different fromthe polarization direction of the polarization filter of the firstillumination section to capture an image of a code provided in theworkpiece, the light being irradiated by at least one of the firstillumination section and the second illumination section and beingreflected at the workpiece; a decoding section that decodes image dataacquired by the imaging section; a lighting control section thatcontrols which of the first illumination section and the secondillumination section is to be lighted; and a condition decision sectionthat decides an illumination condition, based on which is a morefavorable decoding result, a decoding result of the decoding sectionacquired in a state where the first illumination section is lighted andthe second illumination section is not lighted, or a decoding result ofthe decoding section acquired in a state where the first illuminationsection is not lighted, and the second illumination section is lighted.2. The fixed optical information reading device according to claim 1,wherein the condition decision section compares the decoding result ofthe decoding section acquired in the state where the first illuminationsection is lighted and the second illumination section is not lightedwith the decoding result of the decoding section acquired in the statewhere the first illumination section is not lighted, and the secondillumination section is lighted to decide the illumination condition,based on a matching level, which is an index indicating easiness ofreading of the code, or the number of times of success in the decodingof the code.
 3. The fixed optical information reading device accordingto claim 1, wherein when a significant difference does not exist betweenthe decoding result of the decoding section acquired in the state wherethe first illumination section is lighted and the second illuminationsection is not lighted, and the decoding result of the decoding sectionacquired in the state where the first illumination section is notlighted and the second illumination section is lighted, the conditiondecision section decides the illumination condition so that the firstillumination section is lighted and the second illumination section isnot lighted.
 4. The fixed optical information reading device accordingto claim 1, wherein when in both the decoding result of the decodingsection acquired in the state where the first illumination section islighted and the second illumination section is not lighted, and thedecoding result of the decoding section acquired in the state where thefirst illumination section is not lighted and the second illuminationsection is lighted, the decoding of the code succeeds, the conditiondecision section decides the illumination condition so that the firstillumination section is not lighted and the second illumination sectionis lighted.
 5. The fixed optical information reading device according toclaim 1, further comprising: a reading condition control section thatcontrols a reading condition including an imaging condition of theimaging section and an image processing condition in the decodingsection, wherein the reading condition control section starts searchingfor the reading condition after the illumination condition is decided.6. The fixed optical information reading device according to claim 1,further comprising: a connection section that connects a communicationcable to output the decoding result of the decoding section to outside,wherein the first illumination section is arranged farther with respectto a light receiving portion of the imaging section when seen from theconnection section, and the second illumination section is arrangednearer with respect to the light receiving portion of the imagingsection when seen from the connection section.
 7. The fixed opticalinformation reading device according to claim 1, wherein a lighttransmitting plate is arranged in a housing on an emission side of theillumination light of the first illumination section and the secondillumination section, and the polarization filter is attached to an areathat is a part of the light transmitting plate, where the light from thefirst illumination section is transmitted.
 8. The fixed opticalinformation reading device according to claim 7, wherein an incidencearea of the light to the imaging section is provided substantially in acenter of the light transmitting plate, and an emission area of thelight from the first illumination section and an emission area of thelight from the second illumination section are arranged around theincidence area.
 9. The fixed optical information reading deviceaccording to claim 1, wherein the number of light emitters making up thefirst illumination section, and the number of light emitters making upthe second illumination section are coincident.
 10. The fixed opticalinformation reading device according to claim 1, wherein thepolarization direction of the polarization filter of the firstillumination section and the polarization direction of the polarizationfilter of the imaging section are different by 90 degrees.
 11. The fixedoptical information reading device according to claim 1, wherein a shapeof the polarization filter of the imaging section is substantiallycircular.
 12. The fixed optical information reading device according toclaim 1, wherein the polarization filter of the imaging section isprovided with an alignment member to align with the polarization filterof the first illumination section.
 13. The fixed optical informationreading device according to claim 1, wherein in at least one of anoptical system of the imaging section, the first illumination sectionand the second illumination section, a light condensing member having acircular shape in a cross section parallel to an imaging surface of theimaging section is provided.
 14. The fixed optical information readingdevice according to claim 1, further comprising: an imaging controlsection, wherein the imaging control section selects either of apolarization mode and a non-polarization mode in accordance with settinginformation received from a control device provided outside the opticalinformation reading device, the polarization mode being a mode in whichthe first illumination section is lighted and the second illuminationsection is not lighted, the non-polarization mode being a mode in whichthe first illumination section is not lighted and the secondillumination section is lighted.
 15. The fixed optical informationreading device according to claim 1, wherein in a view from anillumination direction of the illumination light of the secondillumination section, the first illumination section is provided in oneside with respect to the imaging section, and the second illuminationsection is provided in an opposite side of the one side with respect tothe imaging section, and the imaging section is provided between thefirst illumination section and second illumination section.
 16. Thefixed optical information reading device according to claim 1, whereinthe polarization filter of the first illumination section and thepolarization filter of the imaging section are detachable from the fixedoptical information reading device.
 17. The fixed optical informationreading device according to claim 1, wherein the first illuminationsection includes two light emitters and the second illumination sectionincludes two light emitters.
 18. A fixed optical information readingdevice, comprising: a first illumination section that irradiates theworkpiece with illumination light through a polarization filter; asecond illumination section that irradiates the workpiece withillumination light without any polarization filter; an imaging sectionprovided with a polarization filter having a polarization directiondifferent from a polarization direction of the polarization filter ofthe first illumination section, the imaging section for receiving lightthrough the polarization filter having the polarization directiondifferent from the polarization direction of the polarization filter ofthe first illumination section to capture an image of a code provided inthe workpiece, the light being irradiated by at least one of the firstillumination section and the second illumination section and beingreflected at the workpiece; a decoding section that decodes image dataacquired by the imaging section; and a reading condition control sectionthat controls a reading condition including an imaging condition of theimaging section and an image processing condition in the decodingsection, wherein the reading condition control section executes coarseadjustment of a brightness parameter in the reading condition withrespect to each of a polarization mode and a non-polarization mode todetermine in which of the polarization mode and the non-polarizationmode the decoding succeeds more, and further executes fine adjustment ofthe brightness parameter with respect to the mode in which the decodingsucceeds more between the polarization mode and the non-polarizationmode, the polarization mode being a mode in which the first illuminationsection is lighted and the second illumination section is not lighted,the non-polarization mode being a mode in which the first illuminationsection is not lighted and the second illumination section is lighted.19. The fixed optical information reading device according to claim 18,wherein a search range of the brightness parameter is different betweenin the polarization mode and in the non-polarization mode.
 20. A fixedoptical information reading device, comprising: a first illuminationsection that irradiates the workpiece with illumination light through apolarization filter; a second illumination section that irradiates theworkpiece with illumination light without any polarization filter; animaging section provided with a polarization filter having apolarization direction different from a polarization direction of thepolarization filter of the first illumination section, the imagingsection for receiving light through the polarization filter having thepolarization direction different from the polarization direction of thepolarization filter of the first illumination section to capture animage of a code provided in the workpiece, the light being irradiated byat least one of the first illumination section and the secondillumination section and being reflected at the workpiece; a decodingsection that decodes image data acquired by the imaging section; and areading condition control section that controls a reading conditionincluding an imaging condition of the imaging section and an imageprocessing condition in the decoding section, wherein the readingcondition control section executes coarse adjustment of a brightnessparameter in the reading condition with respect to each of apolarization mode and a non-polarization mode, and in the coarseadjustment, the reading condition control section executes code searchprocessing of searching for the code from the image data in one of thepolarization mode and the non-polarization mode, when the code is foundby the code search processing, the reading condition control sectionswitches to the other mode of the polarization mode and thenon-polarization mode to again execute the code search processing, andwhen the code is not found in the other mode, the reading conditioncontrol section stops the adjustment of the reading condition in theother mode to execute the adjustment of the reading condition on the onemode, the polarization mode being a mode in which the first illuminationsection is lighted and the second illumination section is not lighted,the non-polarization mode being a mode in which the first illuminationsection is not lighted and the second illumination section is lighted.